/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../../../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BasInvOperPrice extends BasicModel<BasInvOperPrice> {
  invCode?: string; // 存货编码
  operCode?: string; // 工序编码
  iprice?: number; // 计件单价
  enDate?: string; // 生效日期
  exDate?: string; // 失效日期
}

export const basInvOperPriceList = (params?: BasInvOperPrice | any) =>
  defHttp.get<BasInvOperPrice>({ url: adminPath + '/bas/mes/price/basInvOperPrice/list', params });

export const basInvOperPriceListData = (params?: BasInvOperPrice | any) =>
  defHttp.post<Page<BasInvOperPrice>>({
    url: adminPath + '/bas/mes/price/basInvOperPrice/listData',
    params,
  });

export const basInvOperPriceForm = (params?: BasInvOperPrice | any) =>
  defHttp.get<BasInvOperPrice>({ url: adminPath + '/bas/mes/price/basInvOperPrice/form', params });

export const basInvOperPriceSave = (params?: any, data?: BasInvOperPrice | any) =>
  defHttp.postJson<BasInvOperPrice>({
    url: adminPath + '/bas/mes/price/basInvOperPrice/save',
    params,
    data,
  });

export const basInvOperPriceDelete = (params?: BasInvOperPrice | any) =>
  defHttp.get<BasInvOperPrice>({
    url: adminPath + '/bas/mes/price/basInvOperPrice/delete',
    params,
  });
